<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8" />
        <title>北冥有鱼，其名为鲲</title>
        <meta name="description" content="" />
        <link href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" />
        <script src="//cdn.bootcss.com/jquery/1.11.1/jquery.js"></script>
        <script src="//cdn.bootcss.com/twitter-bootstrap/3.3.7/js/bootstrap.min.js"></script>

        <link href="//cdn.bootcss.com/codemirror/5.43.0/codemirror.min.css" rel="stylesheet">
        <script src="//cdn.bootcss.com/codemirror/5.43.0/codemirror.min.js"></script>

        <link href="//cdn.bootcss.com/codemirror/5.43.0/theme/blackboard.min.css" rel="stylesheet">
        <script src="//cdn.bootcss.com/codemirror/5.43.0/mode/javascript/javascript.min.js"></script>
        <style>
            .CodeMirror {
                height:500px;
            }
        </style>

    </head>
    <body>

        {% include navbar.html %}

        <div class="panel panel-default"> 
            {% include panel_header.html %}
            <div class="panel-body">

                <form class="form-horizontal" action="" method="post">
                     <div class="form-group">
                        <textarea class="form-control" id="code" name="code" ></textarea>
                     </div>
                    <input class="btn btn-default" type="submit" value="扫描...">
                </form>
               
            </div>
        </div>
        <script>
            $(function(){
                var options = {
                    lineNumbers:true,
                    mode:{
                        name:'text/javascript'
                    },
                    theme:'blackboard',
                };
                var editor = CodeMirror.fromTextArea(document.getElementById("code"),options); 
                //editor.setValue('{\n\t"type": "web",\n\t"netloc": "",\n\t"target": "web",\n\t"meta":{\n\t\t"system": "windows",\n\t\t"pathlist":[],\n\t\t"filelist":[],\n\t\t"passlist":[]\n\t}\n}'); 
                editor.setValue('{\n\t"type": "web",\n\t"netloc": "",\n\t"target": "web"\n}'); 
            });
        </script>
    </body>
</html>
